home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
001a
/
com_and3.zip
/
PC-2-PC.DOC
< prev
next >
Wrap
Text File
|
1989-10-09
|
20KB
|
825 lines
COM-AND Inter-PC File transfer
-----------------------------------------
COM-AND Inter-PC File transfer
Script based file transfer for the IBM PC
-----------------------------------------
COM-AND is distributed freely and may be copied by anyone for
any number of machines, for purposes of evaluation. The author
offers COM-AND and its accessory programs as a package, as
"shareware". If you USE the program a registration of $35.00 is
required. The author may be reached:
CABER Software
R. (Scott) McGinnis
P.O. Box 3607 Mdse Mart
Chicago, IL 60654-0607
PLINK, GEnie id: TARTAN
CIS id: 73147,2665
Version 1.0: 891009
COM-AND Inter-PC File transfer
Table of Contents
-----------------
I. Introduction .............................................. page 1
II. Installing the script ...................................... page 2
III. Script initialization ...................................... page 3
IV. File transfers ............................................. page 5
V. Exit ....................................................... page 7
VI. DOS gateway ................................................ page 8
VII. Program Requirements ....................................... page 9
VIII. Program and Author Information ............................ page 10
Appendices
----------
A. Null modem ................................................ page 11
B. Async port speeds .......................................... page 12
C. Modem configuration ........................................ page 13
Version 1.0: 891009
COM-AND Inter-PC File transfer Page 1
I. Introduction
A. What is COM-AND?
COM-AND for the IBM PC and compatibles is a communications
program that may be used by itself, or with several integrated
accessory programs (which themselves may be used independantly of
COM-AND). COM-AND provides standard comm program functions: a
dialing directory, macros, disc logging, binary and ASCII file
transfers, scripted execution and so on.
B. The PC-2-PC script
This document details the PC-2-PC script released independantly of
COM-AND. The script supports
o Direct and dialed connection of two PCs
o Current directory listings of each PC (on both PCs)
o Change drive/directory from either PC on either PC
o Wild card multiple file transfer from/to either PC
o Selected file transfer from/to either PC
o DOS gateway during script execution
Version 1.0: 891009
COM-AND Inter-PC File transfer Page 2
II. Installation
A. Install COM-AND
Refer to the COM-AND release documents (README.DOC and COM-AND.
DOC) for the description of COM-AND installation, please.
B. Placing PC-2-PC.CMD
The script file PC-2-PC.CMD should be placed in the COM-AND
default subdirectory. If you use the environment variable
"COM-AND="..., PC-2-PC should be placed in the subdirectory
indicated by that environment variable. Otherwise, place the
script in the same subdirectory as COM-AND.
C. (optional) Create a batch file to invoke the script
Optionally, you may create a batch file to invoke the script.
PC-2-PC is an interpreted script... and therefore will give the
best performance if executed from a RAMDisk. If you have such a
beast, use it! [Folk more modern (than the author) who use
cacheing utilities may freely ignore this advice.]
PC-2-PC will connect to another machine either through a dialed
number or by direct conenct. If you are setting up a direct
connect, using an async port other than the usual modem port (I
myself diasble my mouse...), a batch file is particularly helpful.
For example, I have a batch file to invoke this script:
c:
cd\prod
copy pc-2-pc.cmd e:
com-and com1 115k /fe:pc-2-pc
[My default COM-AND subdirectory is C:\PROD. PC-2-PC.CMD is
placed in C:\PROD. My RAMDisk is E:. The mouse serial port
is COM1 (my modem and my COM-AND's default is COM2). "19k" in
COM-AND's run command sets the COM1 async port speed to 19.2.
The "/fe:pc-2-pc" in COM-AND's run command executes the script
after COM-AND's load- time initialization.]
Version 1.0: 891009
COM-AND Inter-PC File transfer Page 3
III. Script initialization
When PC-2-PC.CMD is executed by COM-AND, there'll be a pause (the
length of which is determined by the speed of the disc on which the
script resides). At its start, the script 'GOTO's the end, to draw
the window. It may seem a silly way to write a script, but once
COM-AND has read the whole script once, performance will be improved
drastically!
The first thing PC-2-PC does is to open a double window. The left
side of the screen will always a list of files in the current subdir-
ectory on the current machine. The right side will be the subdirec-
tory on the other machine once you're connected.
Once the window opens, PC-2-PC begins building and displaying the
current subdirectory. Again, this may take a bit of time... be
patient. When all's done, a window will open over top of the file
list, prompting for action.
At this point, you need to see that COM-AND and the PC-2-PC script
are ready to connect on the machine you with which wish to talk.
With both machines ready to connect, on one, it doesn't matter which,
select either:
2) Wait for direct connect
4) Wait for call connect
If you are making a direct connect, you will be prompted to allow
port and speed specification(s). A carriage return alone at this
point will start the 'waiting'. If you are making a dialed connect,
the script simply goes into an autoanswer mode waiting for a call.
Version 1.0: 891009
COM-AND Inter-PC File transfer Page 4
III. Script initialization (continued)
On the other machine, then select as appropriate:
1) Direct connect
3) Dial the remote PC
If you are making a direct connect, you will be prompted to allow
port and speed specification(s). A carriage return alone at this
point will start connection. If you are making a dialed connect,
you will be asked for a dialing directory number for the number to
be called and its parameters. [Note the script only recognizes
300/1200/2400 baud connects. Its easy to add speeds if need be.]
One point to emphasize: The script that is to 'await' connection
should be started first. The script 'making' the connect should then
be started.
If the two scripts recognize each other, they will begin by exchang-
ing subdirectory lists. When the lists have been exchanged, the
script is ready to use. If the two scripts do not connect, check the
settings (speed etc) used on both, and the null-modem (if used) and
try again.
In particular, if your attempting a direct connect, try a slower
speed connect... the async port used may not be able to handle
very high speeds (see appendix B).
Version 1.0: 891009
COM-AND Inter-PC File transfer Page 5
IV. File Transfers
A. Wildcard transfer
Selection 'W' from the main window will prompt for direction (are
you sending or receiving files) and a wildcard file specification.
Select a direction ('S' or 'R'), and specify the file(s) to be
transferred. A wildcard specification has the form:
[d:][\path...]<filespec>
where "d:" is an optional drive spec, "\path" is an optional
subdirectory specifier and filespec is a file name with optional
"*"s and "?"s that DOS users love and respect. For example:
C:\PROD\COM-AND.*
would move all COM-AND files from one machine to the other. [By
the way, it doesn't hurt anything if you move COM-AND.EXE over the
copy you executed while its executing. It DOES hurt things if you
change the script file... don't touch a script file while its
executing!]
If there is at least one file matching the wildcard specification
you gave, on the appropriate machine, the transfer will begin.
If a file being transferred via a wildcard specifier duplicates a
file already existing, the new file's name will be modified; a
"$" will be placed in the last character position. For example,
if COM-AND.EXE were copied through wildcard transfer into a sub-
directory already containing COM-AND.EXE, the new file would be
named COM-AND.EX$.
The wildcard transfer moves multiple files from one machine to the
other in one direction at a time. The file name given the sender
may be fully qualified (with drive and path). The receiver places
the files received on the current subdirectory.
Version 1.0: 891009
COM-AND Inter-PC File transfer Page 6
IV. File Transfers (continued)
B. Selected file transfer.
You may select up to 5 files from the current local machine's
window, and 5 files from the current remote machine's window for
transfer. The direction of the transfer is implicit. Files are
selected with a point-and-shoot method:
Cursor right Selects the remote window
Cursor left Selects the local window
PgUp Moves the current window (local or remote)
up 20 files
PgDn Moves the current window (local or remote)
down 20 files
Home Moves the current window (local or remote)
to the first 20 files
End Moves the current window (local or remote)
to the last page of files
Cursor up Moves a scroll bar up the list of files
Cursor down Moves a scroll bar down the list of files
Position the scroll bar to a file to be transferred. Then type
'S'. A window will open and the current list of selections is
displayed. You are asked to verify the selection with 'y' or 'n'.
With one or more files selected, 'T' will begins the transfer.
If a file being transferred via selection duplicates a file
already existing, the old file is replaced by the new file.
The selected transfer moves multiple files from one machine to the
other in any direction. Files must be selected from the current
subdirectory (local and remote)... if you change directory on
either side, the list of selected files is cleared.
The receiver places the files received on its current sub-
directory.
Version 1.0: 891009
COM-AND Inter-PC File transfer Page 7
V. Exit
The PC-2-PC script will terminate when ESC or 'E' is pressed in the
main window. [ESC may be used in other windows to cancel a prompt.]
If the script is currently linked to another machine, the script on
the other machine should exit automatically.
If the connection was made via a dialed call, a HANGUP is performed.
Temporary files created by the script are deleted. A general
clean-up is performed.
The PC-2-PC script terminates both itself and COM-AND on exit (you
are returned to the DOS prompt).
You may wish to modify the script to take some other action on exit.
For example, you might wish it simply to exit to COM-AND and not to
DOS. The script is written to have one single exit, labelled "EXIT:"
Code is provided in the "EXIT:" procedure to exit to COM-AND and not
DOS... however, if it is your intention to retain the open line,
beware of the RESET command there. RESET closes the current port and
re-opens the default communications port.
Version 1.0: 891009
COM-AND Inter-PC File transfer Page 8
VI. DOS gateway
At the main window, you may shell-to-DOS at any time with the same
keystroke as used by COM-AND for the purpose: Alt-F10.
If there is memory, a new copy of the SHELL (usually COMMAND.COM) is
executed. A connection, if made, is not lost during a shell
operation (unless you do something like load another comm program!).
When you exit the shell, you are returned to COM-AND and the PC-2-PC
script. If your shell is COMMAND.COM, typing 'exit' will terminate
the shell.
Version 1.0: 891009
COM-AND Inter-PC File transfer Page 9
VII. Program requirements
This program can only function on an IBM PC or DOS compatible
machine. COM-AND does direct to screen buffer fetches and stores
(unless BIOS screen updates are directed using the /C switch or the
Alt-O options menu).
COM-AND is TopView aware even without the /C switch or Alt-O option.
COM-AND supports MDA, CGA, EGA and Hercules. COM-AND uses a Micro-
soft Mouse if one is available...
COM-AND disk I/O is done through the 'Handle' oriented I/O routines
added to DOS 2.0. Therefore DOS 2.0 is a minimum requirement.
COM-AND (Version 2.5) requires 248K for itself. You need 384K
take advantage of the DOS Gateway and to load accessories.
This script requires a 300, 1200 or 2400 baud modem (others could
be supported with modification to the script) or a null-modem to an
asynchronous port.
Version 1.0: 891009
COM-AND Inter-PC File transfer Page 10
VIII. Author information
COM-AND was written using Microsoft Macro-Assembler. The author
likes assembler. Assembly language is an entirely appropriate
vehicle for some of the program, and a not-inappropriate vehicle
for the rest of it. Everything, in moderation...
The author of this script was R. Scott McGinnis of Chicago, IL.
My PLINK and GEnie ID: TARTAN, and CIS id: 73147,2665.
Comment and suggestions are welcomed:
CABER Software
R. (Scott) McGinnis
P.O. Box 3607 Mdse Mart
Chicago, IL 60654-0607
My wife, Elizabeth, has made this script and COM-AND itself possible.
She even indulges on-line, now and then! To her I offer my love,
respect and warmest moments <grin>.
This script (Version 1.0) may be distributed freely (but it isn't a
whole lot of use without COM-AND). Any improvements that are
returned to the author will get attention... errors reported to the
author will be corrected. COM-AND is shareware. If COM-AND is USED
after a reasonable period of evaluation, a registration of $35.00 is
required. If used for a commercial application, registration is
mandatory.
Version 1.0: 891009
COM-AND Inter-PC File transfer Page 11
A. Null modem
This script has been used successfully with the following null modem:
RS-232 pins RS-232 pins
----------- -----------
(fg) 1 ---------------------- 1 (fg)
(tx) 2 --------\ /--------- 2 (tx)
X
(rx) 3 --------/ \--------- 3 (rx)
(gnd) 7 ---------------------- 7 (gnd)
(cts) 4 -+ +- 4 (cts)
! !
(rts) 5 -+ +- 5 (rts)
(dsr) 6 -+ +- 6 (dsr)
(cd) 8 -! !- 8 (cd)
! !
(dtr) 20 -+ +- 20 (dtr)
In other words, Pin 2 of one to pin 3 of the other, and pin 3 of the
first to pin 2 of the other. On each side, jumper pins 4 and 5, and
jumper pins 6, 8, and 20. Connect the pin 7s of each machine, and
the pin 1s.
This null modem will work for many purposes. This script does not
look at CD if a direct connection is used (CDRESPECT OFF). Tieing CD
to DSR on each side would provide an active carrier detect. Other
applications may work better with other null modem connections.
Version 1.0: 891009 Appendices
COM-AND Inter-PC File transfer Page 12
B. Async port speeds
The 8250 UART used in the original asynchronous port (and some
modem) circuits can theoretically run at speed up to 115K baud.
However, in fact, many 8250 chips were found to 'wobble' their
timings at high speeds.
Pin identical replacement UARTS are available that solve the problem.
The reader will find a discussion of the problem and sources for
replacements in Chuck Forsberg's DSZ document, if interested.
The capability of one machine's UART determines the maximum speed
of this script. As errors occur, the transfer efficiency drops.
Drastically.
COM-AND implements only 'relaxed' protocols. This means that time-
outs are very long in COM-AND - suitable for the network/switched
environment, but not for direct connects. When a character is
dropped, or errored, COM-AND waits a fixed time before retransmitting
or requesting a retransmit. As the line speed increases, timeouts on
error reduce the overall efficiency.
The CPU clock speed will also have its toll. COM-AND is a general
purpose communications program, accomodating software flow control
(XON/XOFF). On slower machines, the overhead to check for XON/XOFF
becomes a limiting factor in the software's capability.
If you use this script, experiment with speed settings. If you find
any improvements that might be made, please inform the author.
Version 1.0: 891009 Appendices
COM-AND Inter-PC File transfer Page 13
C. Modem Configuration
COM-AND default values do not require your modem to be configured
in any particular manner. However, certain features cannot be used
unless you configure your modem before you use COM-AND.
1. DTR (Data Terminal Ready)
COM-AND, by default, hangs up using the command sequences defined
through the Alt-S setup (hangup and modem escape). However, you
may alternately select 'Drop DTR to hangup' through the Alt-O
options. Dropping DTR is the only way to hangup certain modems,
and is generally much faster than the command sequences.
Most Hayes compatible modems allow configuration of the DTR sense
through a switch-block. If you wish to use DTR to hangup, be sure
that your modem follows the DTR signal. Refer to the documenta-
tion provided with your modem to be sure that option switches are
set appropriately.
2. CD (Carrier Detect)
COM-AND (presently) uses the CD sense line for several purposes.
The 'CONNECT' test supported in the script language, test for
carrier detect upon exit, and the file transfer protocols all
require that the modem report carrier detect. True carrier detect
is the only way to determine if you are 'on-line' or 'off-line'.
Many Hayes compatible modems are sold with a carrier detect
override (in other words the modem reports carrier detect all the
time). When carrier detect is overridden, COM-AND cannot detect
when carrier is lost during a file transfer or whether to ask if
you want to hangup when you exit.
Be sure that the modem is reporting true CD (instead of it just
saying 'yes'). Most Hayes compatible modems allow configuration
of the CD sense through a switch-block. Refer to the documenta-
tion provided with your modem to be sure that option switches are
set appropriately.
Version 1.0: 891009 Appendices